SRCFILES=$(wildcard *.cpp)
OBJFILES=$(SRCFILES:.cpp=.o)
OUT=BlockReplacer.exe
CXX=g++
CXXFLAGS=-Wall -D_REENTRANT
LDFLAGS=-lpthread -lrt -lz

all: $(OUT)

$(OUT): $(OBJFILES)
	$(CXX) -o $@ $^ $(LDFLAGS)
	
%.o: %.cpp
	$(CXX) -c -o $@ $< $(CXXFLAGS)
	
.PHONY: clean

clean:
	rm -rf *.o
	rm -f $(OUT)
